<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>蓝源Eloan-P2P平台->用户注册</title>
<link rel="stylesheet" href="/js/bootstrap-3.3.2-dist/css/bootstrap.css" type="text/css" />
<link rel="stylesheet" href="/css/core.css" type="text/css" />
<script type="text/javascript" src="/js/jquery/jquery-2.1.3.js"></script>
<script type="text/javascript" src="/js/bootstrap-3.3.2-dist/js/bootstrap.js"></script>
<script type="text/javascript" src="/js/plugins/jquery-validation/jquery.validate.js"></script>
<script type="text/javascript" src="/js/plugins/jquery-validation/localization/messages_zh.js"></script>
<script type="text/javascript" src="/js/plugins/jquery.form.js"></script>
<script type="text/javascript" src="/js/jquery.bootstrap.min.js"></script>

<style type="text/css">
	.el-register-form{
		width:600px; 
		margin-left:auto;
		margin-right:auto;
		margin-top: 20px;
	}
	.el-register-form .form-control{
		width: 220px;
		display: inline;
	}
	.footer {
		color: #999;
		padding-bottom: 30px;
		margin-top: 40px
	}
	.foot_main{width:1100px;margin:auto;}
	.flinks{font-size:14px;color:#666;padding:20px;border-bottom:1px solid #666;}
	.flinks span{margin:0 7px;display:inline-block;font-weight:bold;}
	.flinks span a{color:#666;font-weight:100;text-decoration: none;}
	.flinks span a:hover{color:#348fca;}
</style>
<script type="text/javascript">
	$(function(){

        $.validator.addMethod("checkUsername", function(value) {
            var ret=false;
            $.ajax({
                dataType:"json",
                type:"post",
                async:false,
                url:"/checkUsername.do",
                data:{
                    username:value
                },
                success:function(data){
                    if(data.status===0){
                        ret = true;
					}else{
                        $.messager.popup("用户名已存在");
                        ret=false;
					}
                }
            });
            return ret;
        }, "用户名已经存在!");


        $("#registerForm").validate({
			rules:{
				username:{
				    required	:true,
					rangelength	:[4,16],
                    checkUsername:true
                },
				password:{
                    required	:true,
                    rangelength	:[6,24]
                },
                confirmPwd:{
                    equalTo		:"#password"
				},
			},
			messages:{
                username: {
                    required	: "请输入用户名",
                    rangelength	: "用户名的长度需在{0}到{1}位之间"
                },
                password:{
                    required	: "请输入密码",
                    rangelength	: "密码的长度需在{0}到{1}位之间"
                },
                confirmPwd:{
                    equalTo		:"两次输入的密码不同"
				},
			},
            errorClass:"text-danger",
			highlight:function(element){
				$(element).closest("div.form-group").addClass("has-error");
			},
            unhighlight:function(element){
                $(element).closest("div.form-group").removeClass("has-error");
            },
			submitHandler:function(){
				$("#registerForm").ajaxSubmit({
					dataType:"json",
					success:function(data){
					    if(data.msg!=null){
					        alert(data.msg);
						}
                        if(data.status==0){
                            window.location.href="login.html";
						}

					}
				})
			}
		});

	})

</script>
</head>
<body>
	<!-- 网页头信息 -->
	<div class="el-header" >
		<div class="container" style="position: relative;">
			<ul class="nav navbar-nav navbar-right">
				<li><a href="/index.html">首页</a></li>
				<li><a href="/login.html">登录</a></li>
				<li><a href="#">帮助</a></li>
			</ul>
		</div>
	</div>
	
	<!-- 网页导航 --> 
	<div class="navbar navbar-default el-navbar">
		<div class="container">
			<div class="navbar-header">
				<a href=""><img alt="Brand" src="/images/logo.png"></a>
				<span class="el-page-title">用户注册</span>
			</div>
		</div>
	</div>
	
	<!-- 网页内容 -->
	<div class="container">  
		<form id="registerForm" class="form-horizontal el-register-form" action="/register.do" method="post" >
			<p class="h4" style="margin: 10px 10px 20px;color:#999;">请填写注册信息，点击“提交注册”即可完成注册！</p>
			<div class="form-group">
				<label class="control-label col-sm-2">用户名</label>
				<div class="col-sm-10">
					<input type="text" autocomplete="off" name="username" class="form-control" id="username"/>
					<p class="help-block">用户名为4~16位字母，数字，符号或中文</p>
				</div>
			</div>
			<div class="form-group">
				<label class="control-label col-sm-2">密&emsp;码</label>
				<div class="col-sm-10">
					<input type="password" autocomplete="off" name="password" id="password" class="form-control" />
					<p class="help-block">密码为4~16位字符组成,采用数字、字母、符号安全性更高</p>
				</div> 
			</div>
			<div class="form-group">
				<label class="control-label col-sm-2">确认密码</label>
				<div class="col-sm-10">
					<input type="password" autocomplete="off" name="confirmPwd" class="form-control" />
					<p class="help-block">请再次填写密码</p>	 
				</div>
			</div> 
			<div class="form-gorup">   
				<div class="col-sm-offset-2">  
					<button type="submit" class="btn btn-success">
						同意协议并注册  
					</button>
					&emsp;&emsp;
					<a href="/login.html" class="text-primary">已有账号，马上登录</a>
					
					<p style="padding-left: 50px;margin-top: 15px;">
						<a href="#">《使用协议说明书》</a>
					</p>
				</div>
			</div>
		</form>
	</div>
	<!-- 网页版权 -->
	<div class="footer" style="background-color: white;">
		<div class="foot_main">
			<div class="flinks">
				<span style="display: block;float: left;width: 8%;margin: 0px;">友情链接：</span>
				<div style="float: left;width: 91%;">
					<span><a href="http://www.hxjx360.com" target="_blank">鸿学金信官网</a></span>|
					<span><a href=" http://www.12580.tv/SiteInfo/www.hxjx360.com/" target="_blank">12580网站目录</a></span>|
					<span><a href="http://www.p2peye.com/" target="_blank">网贷天眼</a></span>|
					<span><a href="http://www.wdzj.com " target="_blank">网贷之家</a></span>|
					<span><a href="http://www
                .snccb.com/" target="_blank">遂宁银行</a></span>|
					<span><a href="http://www.zhjrmh.com" target="_blank">中华金融门户网</a></span>|
					<span><a href="http://pay.sina.com.cn/index" target="_blank">新浪支付</a></span>|
					<span><a href="http://www.ancun.com/" target="_blank">安存</a></span>|
					<span><a href="http://qhzx.pingan.com/" target="_blank">前海征信</a></span>|
					<span><a href="http://www.tsign.cn/query-cert.html" target="_blank">E签宝</a></span>|
					<span><a href="http://www.baiqishi.com/about.htm" target="_blank">白骑士</a></span>|
					<span><a href="http://jwh.hxjx360.com/index.htm" target="_blank">投资人监委会</a></span>|
				</div>
				<div style="clear: both;"></div>
			</div>
			<div class="copys" style="border: none;">
				<div style="width: 100%;">
					客服热线:<font size="3">028-86126635&emsp;地址:成都市高新区府城大道西段399号8号楼2单元1306</font>
					<a target="_blank" href="/help/loanRule.html" style="color: #666;">政策法规</a>
					<a target="_blank" href="/help/safe.html" style="color: #666;">安全保障</a>
					<a target="_blank" href="/static/credentials.html" style="color: #666;">公司证件</a>
					<!-- <a href="http://webscan.360.cn/index/checkwebsite/url/www.hxjx360.com" style="float: right;display: block;">
                        <img border="0" src="http://img.webscan.360.cn/status/pai/hash/26df19a0604013aa9554e8583473a4a7"/>
                    </a> -->
				</div>
				<div style="margin-top: 10px;width: 100%;">
					服务时间:9:00-20:00&emsp;投资人群:239371234&emsp;官方交流群:424311016&emsp;
					版权所有 成都鸿学金信商务咨询有限公司<a href="/images/icp.jpg" target="_blank" style="font-size: 12px;color: #666;">ICP证 川B2-20160005号</a> ©蜀ICP备14021832号  <br>公安备案证书编号：510114990296 &nbsp;&nbsp;&nbsp;Copyright
				</div>
			</div>
		</div>
	</div>
</body>
</html>